package com.xps.and.yuntong.Data.bean1;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2018/2/1.
 */

public class OrderSettlement {
    @Override
    public String toString() {
        return "OrderSettlement{" +
                "return_code='" + return_code + '\'' +
                ", return_msg='" + return_msg + '\'' +
                ", return_body=" + return_body +
                '}';
    }

    /**
     * return_code : SUCCESS
     * return_msg : 结算成功
     * return_body : {"congestionMoney":"0.00","congestionTime":0,"waitTime":0,"waitMoney":"0.00","km":"0.000","kmMoney":"12.00","totalMoney":"0.00"}
     */

    private String return_code;
    private String return_msg;
    private ReturnBodyBean return_body;

    public static OrderSettlement objectFromData(String str) {

        return new Gson().fromJson(str, OrderSettlement.class);
    }

    public static OrderSettlement objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), OrderSettlement.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public String getReturn_code() {
        return return_code;
    }

    public void setReturn_code(String return_code) {
        this.return_code = return_code;
    }

    public String getReturn_msg() {
        return return_msg;
    }

    public void setReturn_msg(String return_msg) {
        this.return_msg = return_msg;
    }

    public ReturnBodyBean getReturn_body() {
        return return_body;
    }

    public void setReturn_body(ReturnBodyBean return_body) {
        this.return_body = return_body;
    }

    public static class ReturnBodyBean {
        @Override
        public String toString() {
            return "ReturnBodyBean{" +
                    "congestionMoney='" + congestionMoney + '\'' +
                    ", congestionTime=" + congestionTime +
                    ", waitTime=" + waitTime +
                    ", waitMoney='" + waitMoney + '\'' +
                    ", km='" + km + '\'' +
                    ", kmMoney='" + kmMoney + '\'' +
                    ", totalMoney='" + totalMoney + '\'' +
                    '}';
        }

        /**
         * congestionMoney : 0.00
         * congestionTime : 0
         * waitTime : 0
         * waitMoney : 0.00
         * km : 0.000
         * kmMoney : 12.00
         * totalMoney : 0.00
         */

        private String congestionMoney;
        private int congestionTime;
        private int waitTime;
        private String waitMoney;
        private String km;
        private String kmMoney;
        private String totalMoney;

        public static ReturnBodyBean objectFromData(String str) {

            return new Gson().fromJson(str, ReturnBodyBean.class);
        }

        public static ReturnBodyBean objectFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);

                return new Gson().fromJson(jsonObject.getString(str), ReturnBodyBean.class);
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        public String getCongestionMoney() {
            return congestionMoney;
        }

        public void setCongestionMoney(String congestionMoney) {
            this.congestionMoney = congestionMoney;
        }

        public int getCongestionTime() {
            return congestionTime;
        }

        public void setCongestionTime(int congestionTime) {
            this.congestionTime = congestionTime;
        }

        public int getWaitTime() {
            return waitTime;
        }

        public void setWaitTime(int waitTime) {
            this.waitTime = waitTime;
        }

        public String getWaitMoney() {
            return waitMoney;
        }

        public void setWaitMoney(String waitMoney) {
            this.waitMoney = waitMoney;
        }

        public String getKm() {
            return km;
        }

        public void setKm(String km) {
            this.km = km;
        }

        public String getKmMoney() {
            return kmMoney;
        }

        public void setKmMoney(String kmMoney) {
            this.kmMoney = kmMoney;
        }

        public String getTotalMoney() {
            return totalMoney;
        }

        public void setTotalMoney(String totalMoney) {
            this.totalMoney = totalMoney;
        }
    }
}
